package com.bage.wx.dto;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.io.Serializable;

/**
 * 接收微信事件推送
 * 参考文档地址: https://developers.weixin.qq.com/doc/offiaccount/Message_Management/Receiving_event_pushes.html
 */
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class MpBaseEventRequest implements Serializable {

    private static final long serialVersionUID = 9194059022155191588L;

    // 开发者微信号
    @JsonProperty(value = "ToUserName")
    private String toUserName;

    // 发送方账号(OpenID)
    @JsonProperty(value = "FromUserName")
    private String fromUserName;

    // 消息创建时间(整型)
    @JsonProperty(value = "CreateTime")
    private Integer createTime;

    // 消息类型 event
    @JsonProperty(value = "MsgType")
    private String msgType;
}
